//! This mod is designed to check if a given basis set name is available in [basissetexchange.org]. 
//! If the given basis set name is not a exact match, a similar legal name will be suggested.
//! The basis set name is not case sensitive.
//! 
//! [basissetexchange.org]: https://www.basissetexchange.org/

use fuzzy_matcher::{skim::SkimMatcherV2, FuzzyMatcher};

/// This function checks if a given basis name is available in www.basissetexchange.org.
pub fn check_basis_name(basis: &String) -> bool {
    let basis_list_lower = vec![String::from("2zapa-nr"),
    String::from("2zapa-nr-cv"),
    String::from("3-21g"),
    String::from("3zapa-nr"),
    String::from("3zapa-nr-cv"),
    String::from("4-31g"),
    String::from("4zapa-nr"),
    String::from("4zapa-nr-cv"),
    String::from("5-21g"),
    String::from("5zapa-nr"),
    String::from("5zapa-nr-cv"),
    String::from("6-21g"),
    String::from("6-31++g"),
    String::from("6-31++g*"),
    String::from("6-31++g**"),
    String::from("6-31++g**-j"),
    String::from("6-31+g"),
    String::from("6-31+g*"),
    String::from("6-31+g*-j"),
    String::from("6-31+g**"),
    String::from("6-311++g"),
    String::from("6-311++g(2d,2p)"),
    String::from("6-311++g(3df,3pd)"),
    String::from("6-311++g*"),
    String::from("6-311++g**"),
    String::from("6-311++g**-j"),
    String::from("6-311+g"),
    String::from("6-311+g(2d,p)"),
    String::from("6-311+g*"),
    String::from("6-311+g*-j"),
    String::from("6-311+g**"),
    String::from("6-311g"),
    String::from("6-311g(2df,2pd)"),
    String::from("6-311g(d,p)"),
    String::from("6-311g-j"),
    String::from("6-311g*"),
    String::from("6-311g**"),
    String::from("6-311g**-rifit"),
    String::from("6-311xxg(d,p)"),
    String::from("6-31g"),
    String::from("6-31g(2df,p)"),
    String::from("6-31g(3df,3pd)"),
    String::from("6-31g(d,p)"),
    String::from("6-31g-blaudeau"),
    String::from("6-31g-j"),
    String::from("6-31g*"),
    String::from("6-31g*-blaudeau"),
    String::from("6-31g**"),
    String::from("6-31g**-rifit"),
    String::from("6zapa-nr"),
    String::from("7zapa-nr"),
    String::from("acv2z-j"),
    String::from("acv3z-j"),
    String::from("acv4z-j"),
    String::from("admm-1"),
    String::from("admm-2"),
    String::from("admm-3"),
    String::from("ahgbs-5"),
    String::from("ahgbs-7"),
    String::from("ahgbs-9"),
    String::from("ahgbsp1-5"),
    String::from("ahgbsp1-7"),
    String::from("ahgbsp1-9"),
    String::from("ahgbsp2-5"),
    String::from("ahgbsp2-7"),
    String::from("ahgbsp2-9"),
    String::from("ahgbsp3-5"),
    String::from("ahgbsp3-7"),
    String::from("ahgbsp3-9"),
    String::from("ahlrichs pvdz"),
    String::from("ahlrichs tzv"),
    String::from("ahlrichs vdz"),
    String::from("ahlrichs vtz"),
    String::from("ano-dk3"),
    String::from("ano-r"),
    String::from("ano-r0"),
    String::from("ano-r1"),
    String::from("ano-r2"),
    String::from("ano-r3"),
    String::from("ano-rcc"),
    String::from("ano-rcc-mb"),
    String::from("ano-rcc-vdz"),
    String::from("ano-rcc-vdzp"),
    String::from("ano-rcc-vqzp"),
    String::from("ano-rcc-vtz"),
    String::from("ano-rcc-vtzp"),
    String::from("ano-vt-dz"),
    String::from("ano-vt-qz"),
    String::from("ano-vt-tz"),
    String::from("apr-cc-pv(q+d)z"),
    String::from("atzp-zora"),
    String::from("aug-admm-1"),
    String::from("aug-admm-2"),
    String::from("aug-admm-3"),
    String::from("aug-cc-pcv5z"),
    String::from("aug-cc-pcvdz"),
    String::from("aug-cc-pcvdz-dk"),
    String::from("aug-cc-pcvqz"),
    String::from("aug-cc-pcvqz-dk"),
    String::from("aug-cc-pcvtz"),
    String::from("aug-cc-pcvtz-dk"),
    String::from("aug-cc-pv(5+d)z"),
    String::from("aug-cc-pv(d+d)z"),
    String::from("aug-cc-pv(q+d)z"),
    String::from("aug-cc-pv(t+d)z"),
    String::from("aug-cc-pv5z"),
    String::from("aug-cc-pv5z-dk"),
    String::from("aug-cc-pv5z-optri"),
    String::from("aug-cc-pv5z-pp"),
    String::from("aug-cc-pv5z-pp-optri"),
    String::from("aug-cc-pv5z-pp-rifit"),
    String::from("aug-cc-pv5z-rifit"),
    String::from("aug-cc-pv6z"),
    String::from("aug-cc-pv6z-rifit"),
    String::from("aug-cc-pv7z"),
    String::from("aug-cc-pvdz"),
    String::from("aug-cc-pvdz-dk"),
    String::from("aug-cc-pvdz-dk3"),
    String::from("aug-cc-pvdz-optri"),
    String::from("aug-cc-pvdz-pp"),
    String::from("aug-cc-pvdz-pp-optri"),
    String::from("aug-cc-pvdz-pp-rifit"),
    String::from("aug-cc-pvdz-rifit"),
    String::from("aug-cc-pvdz-x2c"),
    String::from("aug-cc-pvqz"),
    String::from("aug-cc-pvqz-dk"),
    String::from("aug-cc-pvqz-dk3"),
    String::from("aug-cc-pvqz-optri"),
    String::from("aug-cc-pvqz-pp"),
    String::from("aug-cc-pvqz-pp-optri"),
    String::from("aug-cc-pvqz-pp-rifit"),
    String::from("aug-cc-pvqz-rifit"),
    String::from("aug-cc-pvqz-x2c"),
    String::from("aug-cc-pvtz"),
    String::from("aug-cc-pvtz-dk"),
    String::from("aug-cc-pvtz-dk3"),
    String::from("aug-cc-pvtz-j"),
    String::from("aug-cc-pvtz-optri"),
    String::from("aug-cc-pvtz-pp"),
    String::from("aug-cc-pvtz-pp-optri"),
    String::from("aug-cc-pvtz-pp-rifit"),
    String::from("aug-cc-pvtz-rifit"),
    String::from("aug-cc-pvtz-x2c"),
    String::from("aug-cc-pwcv5z"),
    String::from("aug-cc-pwcv5z-dk"),
    String::from("aug-cc-pwcv5z-pp"),
    String::from("aug-cc-pwcv5z-pp-optri"),
    String::from("aug-cc-pwcv5z-pp-rifit"),
    String::from("aug-cc-pwcv5z-rifit"),
    String::from("aug-cc-pwcvdz"),
    String::from("aug-cc-pwcvdz-dk3"),
    String::from("aug-cc-pwcvdz-pp"),
    String::from("aug-cc-pwcvdz-pp-optri"),
    String::from("aug-cc-pwcvdz-pp-rifit"),
    String::from("aug-cc-pwcvdz-rifit"),
    String::from("aug-cc-pwcvdz-x2c"),
    String::from("aug-cc-pwcvqz"),
    String::from("aug-cc-pwcvqz-dk"),
    String::from("aug-cc-pwcvqz-dk3"),
    String::from("aug-cc-pwcvqz-pp"),
    String::from("aug-cc-pwcvqz-pp-optri"),
    String::from("aug-cc-pwcvqz-pp-rifit"),
    String::from("aug-cc-pwcvqz-rifit"),
    String::from("aug-cc-pwcvqz-x2c"),
    String::from("aug-cc-pwcvtz"),
    String::from("aug-cc-pwcvtz-dk"),
    String::from("aug-cc-pwcvtz-dk3"),
    String::from("aug-cc-pwcvtz-pp"),
    String::from("aug-cc-pwcvtz-pp-optri"),
    String::from("aug-cc-pwcvtz-pp-rifit"),
    String::from("aug-cc-pwcvtz-rifit"),
    String::from("aug-cc-pwcvtz-x2c"),
    String::from("aug-ccx-5z"),
    String::from("aug-ccx-dz"),
    String::from("aug-ccx-qz"),
    String::from("aug-ccx-tz"),
    String::from("aug-mcc-pv5z"),
    String::from("aug-mcc-pv6z"),
    String::from("aug-mcc-pv7z"),
    String::from("aug-mcc-pv8z"),
    String::from("aug-mcc-pvqz"),
    String::from("aug-mcc-pvtz"),
    String::from("aug-pc-0"),
    String::from("aug-pc-1"),
    String::from("aug-pc-2"),
    String::from("aug-pc-3"),
    String::from("aug-pc-4"),
    String::from("aug-pch-1"),
    String::from("aug-pch-2"),
    String::from("aug-pch-3"),
    String::from("aug-pch-4"),
    String::from("aug-pcj-0"),
    String::from("aug-pcj-0_2006"),
    String::from("aug-pcj-1"),
    String::from("aug-pcj-1_2006"),
    String::from("aug-pcj-2"),
    String::from("aug-pcj-2_2006"),
    String::from("aug-pcj-3"),
    String::from("aug-pcj-3_2006"),
    String::from("aug-pcj-4"),
    String::from("aug-pcj-4_2006"),
    String::from("aug-pcs-0"),
    String::from("aug-pcs-1"),
    String::from("aug-pcs-2"),
    String::from("aug-pcs-3"),
    String::from("aug-pcs-4"),
    String::from("aug-pcseg-0"),
    String::from("aug-pcseg-1"),
    String::from("aug-pcseg-2"),
    String::from("aug-pcseg-3"),
    String::from("aug-pcseg-4"),
    String::from("aug-pcsseg-0"),
    String::from("aug-pcsseg-1"),
    String::from("aug-pcsseg-2"),
    String::from("aug-pcsseg-3"),
    String::from("aug-pcsseg-4"),
    String::from("aug-pcx-1"),
    String::from("aug-pcx-2"),
    String::from("aug-pcx-3"),
    String::from("aug-pcx-4"),
    String::from("aug-pv7z"),
    String::from("binning 641"),
    String::from("binning 641(d)"),
    String::from("binning 641(df)"),
    String::from("binning 641+"),
    String::from("binning 641+(d)"),
    String::from("binning 641+(df)"),
    String::from("binning 962"),
    String::from("binning 962(d)"),
    String::from("binning 962(df)"),
    String::from("binning 962+"),
    String::from("binning 962+(d)"),
    String::from("binning 962+(df)"),
    String::from("cc-pcv5z"),
    String::from("cc-pcvdz"),
    String::from("cc-pcvdz-dk"),
    String::from("cc-pcvdz-f12"),
    String::from("cc-pcvdz-f12-optri"),
    String::from("cc-pcvdz-f12-rifit"),
    String::from("cc-pcvqz"),
    String::from("cc-pcvqz-dk"),
    String::from("cc-pcvqz-f12"),
    String::from("cc-pcvqz-f12-optri"),
    String::from("cc-pcvqz-f12-rifit"),
    String::from("cc-pcvtz"),
    String::from("cc-pcvtz-dk"),
    String::from("cc-pcvtz-f12"),
    String::from("cc-pcvtz-f12-optri"),
    String::from("cc-pcvtz-f12-rifit"),
    String::from("cc-pv(5+d)z"),
    String::from("cc-pv(d+d)z"),
    String::from("cc-pv(q+d)z"),
    String::from("cc-pv(t+d)z"),
    String::from("cc-pv5z"),
    String::from("cc-pv5z(fi/sf/fw)"),
    String::from("cc-pv5z(fi/sf/lc)"),
    String::from("cc-pv5z(fi/sf/sc)"),
    String::from("cc-pv5z(pt/sf/fw)"),
    String::from("cc-pv5z(pt/sf/lc)"),
    String::from("cc-pv5z(pt/sf/sc)"),
    String::from("cc-pv5z-dk"),
    String::from("cc-pv5z-f12"),
    String::from("cc-pv5z-f12(rev2)"),
    String::from("cc-pv5z-jkfit"),
    String::from("cc-pv5z-pp"),
    String::from("cc-pv5z-pp-rifit"),
    String::from("cc-pv5z-rifit"),
    String::from("cc-pv6z"),
    String::from("cc-pv6z-rifit"),
    String::from("cc-pv8z"),
    String::from("cc-pv9z"),
    String::from("cc-pvdz"),
    String::from("cc-pvdz(fi/sf/fw)"),
    String::from("cc-pvdz(fi/sf/lc)"),
    String::from("cc-pvdz(fi/sf/sc)"),
    String::from("cc-pvdz(pt/sf/fw)"),
    String::from("cc-pvdz(pt/sf/lc)"),
    String::from("cc-pvdz(pt/sf/sc)"),
    String::from("cc-pvdz(seg-opt)"),
    String::from("cc-pvdz-dk"),
    String::from("cc-pvdz-dk3"),
    String::from("cc-pvdz-f12"),
    String::from("cc-pvdz-f12(rev2)"),
    String::from("cc-pvdz-f12-optri"),
    String::from("cc-pvdz-pp"),
    String::from("cc-pvdz-pp-rifit"),
    String::from("cc-pvdz-rifit"),
    String::from("cc-pvdz-x2c"),
    String::from("cc-pvqz"),
    String::from("cc-pvqz(fi/sf/fw)"),
    String::from("cc-pvqz(fi/sf/lc)"),
    String::from("cc-pvqz(fi/sf/sc)"),
    String::from("cc-pvqz(pt/sf/fw)"),
    String::from("cc-pvqz(pt/sf/lc)"),
    String::from("cc-pvqz(pt/sf/sc)"),
    String::from("cc-pvqz(seg-opt)"),
    String::from("cc-pvqz-dk"),
    String::from("cc-pvqz-dk3"),
    String::from("cc-pvqz-f12"),
    String::from("cc-pvqz-f12(rev2)"),
    String::from("cc-pvqz-f12-optri"),
    String::from("cc-pvqz-jkfit"),
    String::from("cc-pvqz-pp"),
    String::from("cc-pvqz-pp-rifit"),
    String::from("cc-pvqz-rifit"),
    String::from("cc-pvqz-x2c"),
    String::from("cc-pvtz"),
    String::from("cc-pvtz(fi/sf/fw)"),
    String::from("cc-pvtz(fi/sf/lc)"),
    String::from("cc-pvtz(fi/sf/sc)"),
    String::from("cc-pvtz(pt/sf/fw)"),
    String::from("cc-pvtz(pt/sf/lc)"),
    String::from("cc-pvtz(pt/sf/sc)"),
    String::from("cc-pvtz(seg-opt)"),
    String::from("cc-pvtz-dk"),
    String::from("cc-pvtz-dk3"),
    String::from("cc-pvtz-f12"),
    String::from("cc-pvtz-f12(rev2)"),
    String::from("cc-pvtz-f12-optri"),
    String::from("cc-pvtz-jkfit"),
    String::from("cc-pvtz-pp"),
    String::from("cc-pvtz-pp-rifit"),
    String::from("cc-pvtz-rifit"),
    String::from("cc-pvtz-x2c"),
    String::from("cc-pwcv5z"),
    String::from("cc-pwcv5z-dk"),
    String::from("cc-pwcv5z-pp"),
    String::from("cc-pwcv5z-pp-rifit"),
    String::from("cc-pwcv5z-rifit"),
    String::from("cc-pwcvdz"),
    String::from("cc-pwcvdz-dk3"),
    String::from("cc-pwcvdz-pp"),
    String::from("cc-pwcvdz-pp-rifit"),
    String::from("cc-pwcvdz-rifit"),
    String::from("cc-pwcvdz-x2c"),
    String::from("cc-pwcvqz"),
    String::from("cc-pwcvqz-dk"),
    String::from("cc-pwcvqz-dk3"),
    String::from("cc-pwcvqz-pp"),
    String::from("cc-pwcvqz-pp-rifit"),
    String::from("cc-pwcvqz-rifit"),
    String::from("cc-pwcvqz-x2c"),
    String::from("cc-pwcvtz"),
    String::from("cc-pwcvtz-dk"),
    String::from("cc-pwcvtz-dk3"),
    String::from("cc-pwcvtz-pp"),
    String::from("cc-pwcvtz-pp-rifit"),
    String::from("cc-pwcvtz-rifit"),
    String::from("cc-pwcvtz-x2c"),
    String::from("ccemd-2"),
    String::from("ccemd-3"),
    String::from("ccj-pv5z"),
    String::from("ccj-pvdz"),
    String::from("ccj-pvqz"),
    String::from("ccj-pvtz"),
    String::from("ccx-5z"),
    String::from("ccx-dz"),
    String::from("ccx-qz"),
    String::from("ccx-tz"),
    String::from("coemd-2"),
    String::from("coemd-3"),
    String::from("coemd-4"),
    String::from("coemd-ref"),
    String::from("cologne dkh2"),
    String::from("crenbl"),
    String::from("crenbl ecp"),
    String::from("crenbs"),
    String::from("crenbs ecp"),
    String::from("d-aug-cc-pv5z"),
    String::from("d-aug-cc-pv6z"),
    String::from("d-aug-cc-pvdz"),
    String::from("d-aug-cc-pvqz"),
    String::from("d-aug-cc-pvtz"),
    String::from("def2-ecp"),
    String::from("def2-qzvp"),
    String::from("def2-qzvp-rifit"),
    String::from("def2-qzvpd"),
    String::from("def2-qzvpp"),
    String::from("def2-qzvpp-rifit"),
    String::from("def2-qzvppd"),
    String::from("def2-qzvppd-rifit"),
    String::from("def2-sv(p)"),
    String::from("def2-sv(p)-jkfit"),
    String::from("def2-sv(p)-rifit"),
    String::from("def2-svp"),
    String::from("def2-svp-rifit"),
    String::from("def2-svpd"),
    String::from("def2-svpd-rifit"),
    String::from("def2-tzvp"),
    String::from("def2-tzvp-rifit"),
    String::from("def2-tzvpd"),
    String::from("def2-tzvpd-rifit"),
    String::from("def2-tzvpp"),
    String::from("def2-tzvpp-rifit"),
    String::from("def2-tzvppd"),
    String::from("def2-tzvppd-rifit"),
    String::from("def2-universal-jfit"),
    String::from("def2-universal-jkfit"),
    String::from("demon2k-dzvp-gga"),
    String::from("dfo+-nrlmol"),
    String::from("dfo-1"),
    String::from("dfo-1-bhs"),
    String::from("dfo-2"),
    String::from("dfo-nrlmol"),
    String::from("dgauss-a1-dftjfit"),
    String::from("dgauss-a1-dftxfit"),
    String::from("dgauss-a2-dftjfit"),
    String::from("dgauss-a2-dftxfit"),
    String::from("dgauss-dzvp"),
    String::from("dgauss-dzvp2"),
    String::from("dgauss-tzvp"),
    String::from("dhf-ecp"),
    String::from("dhf-qzvp"),
    String::from("dhf-qzvpp"),
    String::from("dhf-sv(p)"),
    String::from("dhf-svp"),
    String::from("dhf-tzvp"),
    String::from("dhf-tzvpp"),
    String::from("dz (dunning-hay)"),
    String::from("dz + double rydberg (dunning-hay)"),
    String::from("dz + rydberg (dunning-hay)"),
    String::from("dzp (dunning-hay)"),
    String::from("dzp + diffuse (dunning-hay)"),
    String::from("dzp + rydberg (dunning-hay)"),
    String::from("fano-5z"),
    String::from("fano-6z"),
    String::from("fano-dz"),
    String::from("fano-qz"),
    String::from("fano-tz"),
    String::from("hgbs-5"),
    String::from("hgbs-7"),
    String::from("hgbs-9"),
    String::from("hgbsp1-5"),
    String::from("hgbsp1-7"),
    String::from("hgbsp1-9"),
    String::from("hgbsp2-5"),
    String::from("hgbsp2-7"),
    String::from("hgbsp2-9"),
    String::from("hgbsp3-5"),
    String::from("hgbsp3-7"),
    String::from("hgbsp3-9"),
    String::from("iglo-ii"),
    String::from("iglo-iii"),
    String::from("jgauss-dzp"),
    String::from("jgauss-qz2p"),
    String::from("jgauss-qzp"),
    String::from("jgauss-tzp1"),
    String::from("jgauss-tzp2"),
    String::from("jorge-5zp"),
    String::from("jorge-5zp-dkh"),
    String::from("jorge-6zp"),
    String::from("jorge-6zp-dkh"),
    String::from("jorge-a5zp"),
    String::from("jorge-adzp"),
    String::from("jorge-aqzp"),
    String::from("jorge-atzp"),
    String::from("jorge-dzp"),
    String::from("jorge-dzp-dkh"),
    String::from("jorge-qzp"),
    String::from("jorge-qzp-dkh"),
    String::from("jorge-tzp"),
    String::from("jorge-tzp-dkh"),
    String::from("jul-cc-pv(d+d)z"),
    String::from("jul-cc-pv(q+d)z"),
    String::from("jul-cc-pv(t+d)z"),
    String::from("jun-cc-pv(d+d)z"),
    String::from("jun-cc-pv(q+d)z"),
    String::from("jun-cc-pv(t+d)z"),
    String::from("koga unpolarized"),
    String::from("lanl08"),
    String::from("lanl08(d)"),
    String::from("lanl08(f)"),
    String::from("lanl08+"),
    String::from("lanl2dz"),
    String::from("lanl2dz ecp"),
    String::from("lanl2dzdp"),
    String::from("lanl2tz"),
    String::from("lanl2tz(f)"),
    String::from("lanl2tz+"),
    String::from("m6-31g"),
    String::from("m6-31g*"),
    String::from("maug-cc-pv(d+d)z"),
    String::from("maug-cc-pv(q+d)z"),
    String::from("maug-cc-pv(t+d)z"),
    String::from("may-cc-pv(q+d)z"),
    String::from("may-cc-pv(t+d)z"),
    String::from("midi"),
    String::from("midi!"),
    String::from("midix"),
    String::from("mini"),
    String::from("modified-lanl2dz"),
    String::from("nasa ames ano"),
    String::from("nasa ames ano2"),
    String::from("nasa ames cc-pcv5z"),
    String::from("nasa ames cc-pcvqz"),
    String::from("nasa ames cc-pcvtz"),
    String::from("nasa ames cc-pv5z"),
    String::from("nasa ames cc-pvqz"),
    String::from("nasa ames cc-pvtz"),
    String::from("nlo-v"),
    String::from("nmr-dkh (tz2p)"),
    String::from("orp"),
    String::from("partridge uncontracted 1"),
    String::from("partridge uncontracted 2"),
    String::from("partridge uncontracted 3"),
    String::from("partridge uncontracted 4"),
    String::from("pc-0"),
    String::from("pc-1"),
    String::from("pc-2"),
    String::from("pc-3"),
    String::from("pc-4"),
    String::from("pcemd-2"),
    String::from("pcemd-3"),
    String::from("pcemd-4"),
    String::from("pch-1"),
    String::from("pch-2"),
    String::from("pch-3"),
    String::from("pch-4"),
    String::from("pcj-0"),
    String::from("pcj-0_2006"),
    String::from("pcj-1"),
    String::from("pcj-1_2006"),
    String::from("pcj-2"),
    String::from("pcj-2_2006"),
    String::from("pcj-3"),
    String::from("pcj-3_2006"),
    String::from("pcj-4"),
    String::from("pcj-4_2006"),
    String::from("pcs-0"),
    String::from("pcs-1"),
    String::from("pcs-2"),
    String::from("pcs-3"),
    String::from("pcs-4"),
    String::from("pcseg-0"),
    String::from("pcseg-1"),
    String::from("pcseg-2"),
    String::from("pcseg-3"),
    String::from("pcseg-4"),
    String::from("pcsseg-0"),
    String::from("pcsseg-1"),
    String::from("pcsseg-2"),
    String::from("pcsseg-3"),
    String::from("pcsseg-4"),
    String::from("pcx-1"),
    String::from("pcx-2"),
    String::from("pcx-3"),
    String::from("pcx-4"),
    String::from("psbkjc"),
    String::from("pt - mdzp"),
    String::from("pv6z"),
    String::from("pv7z"),
    String::from("roos augmented double zeta ano"),
    String::from("roos augmented triple zeta ano"),
    String::from("s3-21g"),
    String::from("s3-21g*"),
    String::from("s6-31g"),
    String::from("s6-31g*"),
    String::from("sadlej pvtz"),
    String::from("sadlej+"),
    String::from("sap_grasp_large"),
    String::from("sap_grasp_small"),
    String::from("sap_helfem_large"),
    String::from("sap_helfem_small"),
    String::from("sapporo-dkh3-dzp"),
    String::from("sapporo-dkh3-dzp-2012"),
    String::from("sapporo-dkh3-dzp-2012-diffuse"),
    String::from("sapporo-dkh3-dzp-diffuse"),
    String::from("sapporo-dkh3-qzp"),
    String::from("sapporo-dkh3-qzp-2012"),
    String::from("sapporo-dkh3-qzp-2012-diffuse"),
    String::from("sapporo-dkh3-qzp-diffuse"),
    String::from("sapporo-dkh3-tzp"),
    String::from("sapporo-dkh3-tzp-2012"),
    String::from("sapporo-dkh3-tzp-2012-diffuse"),
    String::from("sapporo-dkh3-tzp-diffuse"),
    String::from("sapporo-dzp"),
    String::from("sapporo-dzp-2012"),
    String::from("sapporo-dzp-2012-diffuse"),
    String::from("sapporo-dzp-diffuse"),
    String::from("sapporo-qzp"),
    String::from("sapporo-qzp-2012"),
    String::from("sapporo-qzp-2012-diffuse"),
    String::from("sapporo-qzp-diffuse"),
    String::from("sapporo-tzp"),
    String::from("sapporo-tzp-2012"),
    String::from("sapporo-tzp-2012-diffuse"),
    String::from("sapporo-tzp-diffuse"),
    String::from("sarc-dkh2"),
    String::from("sarc-zora"),
    String::from("sarc2-qzv-dkh2"),
    String::from("sarc2-qzv-dkh2-jkfit"),
    String::from("sarc2-qzv-zora"),
    String::from("sarc2-qzv-zora-jkfit"),
    String::from("sarc2-qzvp-dkh2"),
    String::from("sarc2-qzvp-dkh2-jkfit"),
    String::from("sarc2-qzvp-zora"),
    String::from("sarc2-qzvp-zora-jkfit"),
    String::from("sbkjc polarized (p,2d) - lfk"),
    String::from("sbkjc-ecp"),
    String::from("sbkjc-vdz"),
    String::from("sbo4-dz(d)-3g"),
    String::from("sbo4-dz(d,p)-3g"),
    String::from("sbo4-sz-3g"),
    String::from("scaled mini"),
    String::from("sto-2g"),
    String::from("sto-3g"),
    String::from("sto-3g*"),
    String::from("sto-4g"),
    String::from("sto-5g"),
    String::from("sto-6g"),
    String::from("stuttgart rlc"),
    String::from("stuttgart rlc ecp"),
    String::from("stuttgart rsc 1997"),
    String::from("stuttgart rsc 1997 ecp"),
    String::from("stuttgart rsc ano"),
    String::from("stuttgart rsc segmented + ecp"),
    String::from("sv (dunning-hay)"),
    String::from("sv + double rydberg (dunning-hay)"),
    String::from("sv + rydberg (dunning-hay)"),
    String::from("svp (dunning-hay)"),
    String::from("svp + diffuse (dunning-hay)"),
    String::from("svp + diffuse + rydberg (dunning-hay)"),
    String::from("svp + rydberg (dunning-hay)"),
    String::from("tz (dunning-hay)"),
    String::from("tzp-zora"),
    String::from("ugbs"),
    String::from("un-ccemd-ref"),
    String::from("un-pcemd-ref"),
    String::from("wachters+f"),
    String::from("wtbs"),
    String::from("x2c-jfit"),
    String::from("x2c-jfit-universal"),
    String::from("x2c-qzvpall"),
    String::from("x2c-qzvpall-2c"),
    String::from("x2c-qzvpall-2c-s"),
    String::from("x2c-qzvpall-s"),
    String::from("x2c-qzvppall"),
    String::from("x2c-qzvppall-2c"),
    String::from("x2c-qzvppall-2c-s"),
    String::from("x2c-qzvppall-s"),
    String::from("x2c-sv(p)all"),
    String::from("x2c-sv(p)all-2c"),
    String::from("x2c-sv(p)all-s"),
    String::from("x2c-svpall"),
    String::from("x2c-svpall-2c"),
    String::from("x2c-svpall-s"),
    String::from("x2c-tzvpall"),
    String::from("x2c-tzvpall-2c"),
    String::from("x2c-tzvpall-s"),
    String::from("x2c-tzvppall"),
    String::from("x2c-tzvppall-2c"),
    String::from("x2c-tzvppall-s")];

    basis_list_lower.contains(&basis.to_lowercase())

}

/// This function gives a similar legal basis set name to the given one.
pub fn basis_fuzzy_matcher(basis: &String) -> Option<String> {
    
    let basis_list = vec![String::from("2ZaPa-NR"),
    String::from("2ZaPa-NR-CV"),
    String::from("3-21G"),
    String::from("3ZaPa-NR"),
    String::from("3ZaPa-NR-CV"),
    String::from("4-31G"),
    String::from("4ZaPa-NR"),
    String::from("4ZaPa-NR-CV"),
    String::from("5-21G"),
    String::from("5ZaPa-NR"),
    String::from("5ZaPa-NR-CV"),
    String::from("6-21G"),
    String::from("6-31++G"),
    String::from("6-31++G*"),
    String::from("6-31++G**"),
    String::from("6-31++G**-J"),
    String::from("6-31+G"),
    String::from("6-31+G*"),
    String::from("6-31+G*-J"),
    String::from("6-31+G**"),
    String::from("6-311++G"),
    String::from("6-311++G(2d,2p)"),
    String::from("6-311++G(3df,3pd)"),
    String::from("6-311++G*"),
    String::from("6-311++G**"),
    String::from("6-311++G**-J"),
    String::from("6-311+G"),
    String::from("6-311+G(2d,p)"),
    String::from("6-311+G*"),
    String::from("6-311+G*-J"),
    String::from("6-311+G**"),
    String::from("6-311G"),
    String::from("6-311G(2df,2pd)"),
    String::from("6-311G(d,p)"),
    String::from("6-311G-J"),
    String::from("6-311G*"),
    String::from("6-311G**"),
    String::from("6-311G**-RIFIT"),
    String::from("6-311xxG(d,p)"),
    String::from("6-31G"),
    String::from("6-31G(2df,p)"),
    String::from("6-31G(3df,3pd)"),
    String::from("6-31G(d,p)"),
    String::from("6-31G-Blaudeau"),
    String::from("6-31G-J"),
    String::from("6-31G*"),
    String::from("6-31G*-Blaudeau"),
    String::from("6-31G**"),
    String::from("6-31G**-RIFIT"),
    String::from("6ZaPa-NR"),
    String::from("7ZaPa-NR"),
    String::from("acv2z-J"),
    String::from("acv3z-J"),
    String::from("acv4z-J"),
    String::from("admm-1"),
    String::from("admm-2"),
    String::from("admm-3"),
    String::from("AHGBS-5"),
    String::from("AHGBS-7"),
    String::from("AHGBS-9"),
    String::from("AHGBSP1-5"),
    String::from("AHGBSP1-7"),
    String::from("AHGBSP1-9"),
    String::from("AHGBSP2-5"),
    String::from("AHGBSP2-7"),
    String::from("AHGBSP2-9"),
    String::from("AHGBSP3-5"),
    String::from("AHGBSP3-7"),
    String::from("AHGBSP3-9"),
    String::from("Ahlrichs pVDZ"),
    String::from("Ahlrichs TZV"),
    String::from("Ahlrichs VDZ"),
    String::from("Ahlrichs VTZ"),
    String::from("ANO-DK3"),
    String::from("ANO-R"),
    String::from("ANO-R0"),
    String::from("ANO-R1"),
    String::from("ANO-R2"),
    String::from("ANO-R3"),
    String::from("ANO-RCC"),
    String::from("ANO-RCC-MB"),
    String::from("ANO-RCC-VDZ"),
    String::from("ANO-RCC-VDZP"),
    String::from("ANO-RCC-VQZP"),
    String::from("ANO-RCC-VTZ"),
    String::from("ANO-RCC-VTZP"),
    String::from("ANO-VT-DZ"),
    String::from("ANO-VT-QZ"),
    String::from("ANO-VT-TZ"),
    String::from("apr-cc-pV(Q+d)Z"),
    String::from("ATZP-ZORA"),
    String::from("aug-admm-1"),
    String::from("aug-admm-2"),
    String::from("aug-admm-3"),
    String::from("aug-cc-pCV5Z"),
    String::from("aug-cc-pCVDZ"),
    String::from("aug-cc-pCVDZ-DK"),
    String::from("aug-cc-pCVQZ"),
    String::from("aug-cc-pCVQZ-DK"),
    String::from("aug-cc-pCVTZ"),
    String::from("aug-cc-pCVTZ-DK"),
    String::from("aug-cc-pV(5+d)Z"),
    String::from("aug-cc-pV(D+d)Z"),
    String::from("aug-cc-pV(Q+d)Z"),
    String::from("aug-cc-pV(T+d)Z"),
    String::from("aug-cc-pV5Z"),
    String::from("aug-cc-pV5Z-DK"),
    String::from("aug-cc-pV5Z-OPTRI"),
    String::from("aug-cc-pV5Z-PP"),
    String::from("aug-cc-pV5Z-PP-OPTRI"),
    String::from("aug-cc-pV5Z-PP-RIFIT"),
    String::from("aug-cc-pV5Z-RIFIT"),
    String::from("aug-cc-pV6Z"),
    String::from("aug-cc-pV6Z-RIFIT"),
    String::from("aug-cc-pV7Z"),
    String::from("aug-cc-pVDZ"),
    String::from("aug-cc-pVDZ-DK"),
    String::from("aug-cc-pVDZ-DK3"),
    String::from("aug-cc-pVDZ-OPTRI"),
    String::from("aug-cc-pVDZ-PP"),
    String::from("aug-cc-pVDZ-PP-OPTRI"),
    String::from("aug-cc-pVDZ-PP-RIFIT"),
    String::from("aug-cc-pVDZ-RIFIT"),
    String::from("aug-cc-pVDZ-X2C"),
    String::from("aug-cc-pVQZ"),
    String::from("aug-cc-pVQZ-DK"),
    String::from("aug-cc-pVQZ-DK3"),
    String::from("aug-cc-pVQZ-OPTRI"),
    String::from("aug-cc-pVQZ-PP"),
    String::from("aug-cc-pVQZ-PP-OPTRI"),
    String::from("aug-cc-pVQZ-PP-RIFIT"),
    String::from("aug-cc-pVQZ-RIFIT"),
    String::from("aug-cc-pVQZ-X2C"),
    String::from("aug-cc-pVTZ"),
    String::from("aug-cc-pVTZ-DK"),
    String::from("aug-cc-pVTZ-DK3"),
    String::from("aug-cc-pVTZ-J"),
    String::from("aug-cc-pVTZ-OPTRI"),
    String::from("aug-cc-pVTZ-PP"),
    String::from("aug-cc-pVTZ-PP-OPTRI"),
    String::from("aug-cc-pVTZ-PP-RIFIT"),
    String::from("aug-cc-pVTZ-RIFIT"),
    String::from("aug-cc-pVTZ-X2C"),
    String::from("aug-cc-pwCV5Z"),
    String::from("aug-cc-pwCV5Z-DK"),
    String::from("aug-cc-pwCV5Z-PP"),
    String::from("aug-cc-pwCV5Z-PP-OPTRI"),
    String::from("aug-cc-pwCV5Z-PP-RIFIT"),
    String::from("aug-cc-pwCV5Z-RIFIT"),
    String::from("aug-cc-pwCVDZ"),
    String::from("aug-cc-pwCVDZ-DK3"),
    String::from("aug-cc-pwCVDZ-PP"),
    String::from("aug-cc-pwCVDZ-PP-OPTRI"),
    String::from("aug-cc-pwCVDZ-PP-RIFIT"),
    String::from("aug-cc-pwCVDZ-RIFIT"),
    String::from("aug-cc-pwCVDZ-X2C"),
    String::from("aug-cc-pwCVQZ"),
    String::from("aug-cc-pwCVQZ-DK"),
    String::from("aug-cc-pwCVQZ-DK3"),
    String::from("aug-cc-pwCVQZ-PP"),
    String::from("aug-cc-pwCVQZ-PP-OPTRI"),
    String::from("aug-cc-pwCVQZ-PP-RIFIT"),
    String::from("aug-cc-pwCVQZ-RIFIT"),
    String::from("aug-cc-pwCVQZ-X2C"),
    String::from("aug-cc-pwCVTZ"),
    String::from("aug-cc-pwCVTZ-DK"),
    String::from("aug-cc-pwCVTZ-DK3"),
    String::from("aug-cc-pwCVTZ-PP"),
    String::from("aug-cc-pwCVTZ-PP-OPTRI"),
    String::from("aug-cc-pwCVTZ-PP-RIFIT"),
    String::from("aug-cc-pwCVTZ-RIFIT"),
    String::from("aug-cc-pwCVTZ-X2C"),
    String::from("aug-ccX-5Z"),
    String::from("aug-ccX-DZ"),
    String::from("aug-ccX-QZ"),
    String::from("aug-ccX-TZ"),
    String::from("aug-mcc-pV5Z"),
    String::from("aug-mcc-pV6Z"),
    String::from("aug-mcc-pV7Z"),
    String::from("aug-mcc-pV8Z"),
    String::from("aug-mcc-pVQZ"),
    String::from("aug-mcc-pVTZ"),
    String::from("aug-pc-0"),
    String::from("aug-pc-1"),
    String::from("aug-pc-2"),
    String::from("aug-pc-3"),
    String::from("aug-pc-4"),
    String::from("aug-pcH-1"),
    String::from("aug-pcH-2"),
    String::from("aug-pcH-3"),
    String::from("aug-pcH-4"),
    String::from("aug-pcJ-0"),
    String::from("aug-pcJ-0_2006"),
    String::from("aug-pcJ-1"),
    String::from("aug-pcJ-1_2006"),
    String::from("aug-pcJ-2"),
    String::from("aug-pcJ-2_2006"),
    String::from("aug-pcJ-3"),
    String::from("aug-pcJ-3_2006"),
    String::from("aug-pcJ-4"),
    String::from("aug-pcJ-4_2006"),
    String::from("aug-pcS-0"),
    String::from("aug-pcS-1"),
    String::from("aug-pcS-2"),
    String::from("aug-pcS-3"),
    String::from("aug-pcS-4"),
    String::from("aug-pcseg-0"),
    String::from("aug-pcseg-1"),
    String::from("aug-pcseg-2"),
    String::from("aug-pcseg-3"),
    String::from("aug-pcseg-4"),
    String::from("aug-pcSseg-0"),
    String::from("aug-pcSseg-1"),
    String::from("aug-pcSseg-2"),
    String::from("aug-pcSseg-3"),
    String::from("aug-pcSseg-4"),
    String::from("aug-pcX-1"),
    String::from("aug-pcX-2"),
    String::from("aug-pcX-3"),
    String::from("aug-pcX-4"),
    String::from("aug-pV7Z"),
    String::from("binning 641"),
    String::from("binning 641(d)"),
    String::from("binning 641(df)"),
    String::from("binning 641+"),
    String::from("binning 641+(d)"),
    String::from("binning 641+(df)"),
    String::from("binning 962"),
    String::from("binning 962(d)"),
    String::from("binning 962(df)"),
    String::from("binning 962+"),
    String::from("binning 962+(d)"),
    String::from("binning 962+(df)"),
    String::from("cc-pCV5Z"),
    String::from("cc-pCVDZ"),
    String::from("cc-pCVDZ-DK"),
    String::from("cc-pCVDZ-F12"),
    String::from("cc-pCVDZ-F12-OPTRI"),
    String::from("cc-pCVDZ-F12-RIFIT"),
    String::from("cc-pCVQZ"),
    String::from("cc-pCVQZ-DK"),
    String::from("cc-pCVQZ-F12"),
    String::from("cc-pCVQZ-F12-OPTRI"),
    String::from("cc-pCVQZ-F12-RIFIT"),
    String::from("cc-pCVTZ"),
    String::from("cc-pCVTZ-DK"),
    String::from("cc-pCVTZ-F12"),
    String::from("cc-pCVTZ-F12-OPTRI"),
    String::from("cc-pCVTZ-F12-RIFIT"),
    String::from("cc-pV(5+d)Z"),
    String::from("cc-pV(D+d)Z"),
    String::from("cc-pV(Q+d)Z"),
    String::from("cc-pV(T+d)Z"),
    String::from("cc-pV5Z"),
    String::from("cc-pV5Z(fi/sf/fw)"),
    String::from("cc-pV5Z(fi/sf/lc)"),
    String::from("cc-pV5Z(fi/sf/sc)"),
    String::from("cc-pV5Z(pt/sf/fw)"),
    String::from("cc-pV5Z(pt/sf/lc)"),
    String::from("cc-pV5Z(pt/sf/sc)"),
    String::from("cc-pV5Z-DK"),
    String::from("cc-pV5Z-F12"),
    String::from("cc-pV5Z-F12(rev2)"),
    String::from("cc-pV5Z-JKFIT"),
    String::from("cc-pV5Z-PP"),
    String::from("cc-pV5Z-PP-RIFIT"),
    String::from("cc-pV5Z-RIFIT"),
    String::from("cc-pV6Z"),
    String::from("cc-pV6Z-RIFIT"),
    String::from("cc-pV8Z"),
    String::from("cc-pV9Z"),
    String::from("cc-pVDZ"),
    String::from("cc-pVDZ(fi/sf/fw)"),
    String::from("cc-pVDZ(fi/sf/lc)"),
    String::from("cc-pVDZ(fi/sf/sc)"),
    String::from("cc-pVDZ(pt/sf/fw)"),
    String::from("cc-pVDZ(pt/sf/lc)"),
    String::from("cc-pVDZ(pt/sf/sc)"),
    String::from("cc-pVDZ(seg-opt)"),
    String::from("cc-pVDZ-DK"),
    String::from("cc-pVDZ-DK3"),
    String::from("cc-pVDZ-F12"),
    String::from("cc-pVDZ-F12(rev2)"),
    String::from("cc-pVDZ-F12-OPTRI"),
    String::from("cc-pVDZ-PP"),
    String::from("cc-pVDZ-PP-RIFIT"),
    String::from("cc-pVDZ-RIFIT"),
    String::from("cc-pVDZ-X2C"),
    String::from("cc-pVQZ"),
    String::from("cc-pVQZ(fi/sf/fw)"),
    String::from("cc-pVQZ(fi/sf/lc)"),
    String::from("cc-pVQZ(fi/sf/sc)"),
    String::from("cc-pVQZ(pt/sf/fw)"),
    String::from("cc-pVQZ(pt/sf/lc)"),
    String::from("cc-pVQZ(pt/sf/sc)"),
    String::from("cc-pVQZ(seg-opt)"),
    String::from("cc-pVQZ-DK"),
    String::from("cc-pVQZ-DK3"),
    String::from("cc-pVQZ-F12"),
    String::from("cc-pVQZ-F12(rev2)"),
    String::from("cc-pVQZ-F12-OPTRI"),
    String::from("cc-pVQZ-JKFIT"),
    String::from("cc-pVQZ-PP"),
    String::from("cc-pVQZ-PP-RIFIT"),
    String::from("cc-pVQZ-RIFIT"),
    String::from("cc-pVQZ-X2C"),
    String::from("cc-pVTZ"),
    String::from("cc-pVTZ(fi/sf/fw)"),
    String::from("cc-pVTZ(fi/sf/lc)"),
    String::from("cc-pVTZ(fi/sf/sc)"),
    String::from("cc-pVTZ(pt/sf/fw)"),
    String::from("cc-pVTZ(pt/sf/lc)"),
    String::from("cc-pVTZ(pt/sf/sc)"),
    String::from("cc-pVTZ(seg-opt)"),
    String::from("cc-pVTZ-DK"),
    String::from("cc-pVTZ-DK3"),
    String::from("cc-pVTZ-F12"),
    String::from("cc-pVTZ-F12(rev2)"),
    String::from("cc-pVTZ-F12-OPTRI"),
    String::from("cc-pVTZ-JKFIT"),
    String::from("cc-pVTZ-PP"),
    String::from("cc-pVTZ-PP-RIFIT"),
    String::from("cc-pVTZ-RIFIT"),
    String::from("cc-pVTZ-X2C"),
    String::from("cc-pwCV5Z"),
    String::from("cc-pwCV5Z-DK"),
    String::from("cc-pwCV5Z-PP"),
    String::from("cc-pwCV5Z-PP-RIFIT"),
    String::from("cc-pwCV5Z-RIFIT"),
    String::from("cc-pwCVDZ"),
    String::from("cc-pwCVDZ-DK3"),
    String::from("cc-pwCVDZ-PP"),
    String::from("cc-pwCVDZ-PP-RIFIT"),
    String::from("cc-pwCVDZ-RIFIT"),
    String::from("cc-pwCVDZ-X2C"),
    String::from("cc-pwCVQZ"),
    String::from("cc-pwCVQZ-DK"),
    String::from("cc-pwCVQZ-DK3"),
    String::from("cc-pwCVQZ-PP"),
    String::from("cc-pwCVQZ-PP-RIFIT"),
    String::from("cc-pwCVQZ-RIFIT"),
    String::from("cc-pwCVQZ-X2C"),
    String::from("cc-pwCVTZ"),
    String::from("cc-pwCVTZ-DK"),
    String::from("cc-pwCVTZ-DK3"),
    String::from("cc-pwCVTZ-PP"),
    String::from("cc-pwCVTZ-PP-RIFIT"),
    String::from("cc-pwCVTZ-RIFIT"),
    String::from("cc-pwCVTZ-X2C"),
    String::from("ccemd-2"),
    String::from("ccemd-3"),
    String::from("ccJ-pV5Z"),
    String::from("ccJ-pVDZ"),
    String::from("ccJ-pVQZ"),
    String::from("ccJ-pVTZ"),
    String::from("ccX-5Z"),
    String::from("ccX-DZ"),
    String::from("ccX-QZ"),
    String::from("ccX-TZ"),
    String::from("coemd-2"),
    String::from("coemd-3"),
    String::from("coemd-4"),
    String::from("coemd-ref"),
    String::from("Cologne DKH2"),
    String::from("CRENBL"),
    String::from("CRENBL ECP"),
    String::from("CRENBS"),
    String::from("CRENBS ECP"),
    String::from("d-aug-cc-pV5Z"),
    String::from("d-aug-cc-pV6Z"),
    String::from("d-aug-cc-pVDZ"),
    String::from("d-aug-cc-pVQZ"),
    String::from("d-aug-cc-pVTZ"),
    String::from("def2-ECP"),
    String::from("def2-QZVP"),
    String::from("def2-QZVP-RIFIT"),
    String::from("def2-QZVPD"),
    String::from("def2-QZVPP"),
    String::from("def2-QZVPP-RIFIT"),
    String::from("def2-QZVPPD"),
    String::from("def2-QZVPPD-RIFIT"),
    String::from("def2-SV(P)"),
    String::from("def2-SV(P)-JKFIT"),
    String::from("def2-SV(P)-RIFIT"),
    String::from("def2-SVP"),
    String::from("def2-SVP-RIFIT"),
    String::from("def2-SVPD"),
    String::from("def2-SVPD-RIFIT"),
    String::from("def2-TZVP"),
    String::from("def2-TZVP-RIFIT"),
    String::from("def2-TZVPD"),
    String::from("def2-TZVPD-RIFIT"),
    String::from("def2-TZVPP"),
    String::from("def2-TZVPP-RIFIT"),
    String::from("def2-TZVPPD"),
    String::from("def2-TZVPPD-RIFIT"),
    String::from("def2-universal-JFIT"),
    String::from("def2-universal-JKFIT"),
    String::from("deMon2k-DZVP-GGA"),
    String::from("DFO+-NRLMOL"),
    String::from("DFO-1"),
    String::from("DFO-1-BHS"),
    String::from("DFO-2"),
    String::from("DFO-NRLMOL"),
    String::from("dgauss-a1-dftjfit"),
    String::from("dgauss-a1-dftxfit"),
    String::from("dgauss-a2-dftjfit"),
    String::from("dgauss-a2-dftxfit"),
    String::from("dgauss-dzvp"),
    String::from("dgauss-dzvp2"),
    String::from("dgauss-tzvp"),
    String::from("dhf-ECP"),
    String::from("dhf-QZVP"),
    String::from("dhf-QZVPP"),
    String::from("dhf-SV(P)"),
    String::from("dhf-SVP"),
    String::from("dhf-TZVP"),
    String::from("dhf-TZVPP"),
    String::from("DZ (Dunning-Hay)"),
    String::from("DZ + Double Rydberg (Dunning-Hay)"),
    String::from("DZ + Rydberg (Dunning-Hay)"),
    String::from("DZP (Dunning-Hay)"),
    String::from("DZP + Diffuse (Dunning-Hay)"),
    String::from("DZP + Rydberg (Dunning-Hay)"),
    String::from("FANO-5Z"),
    String::from("FANO-6Z"),
    String::from("FANO-DZ"),
    String::from("FANO-QZ"),
    String::from("FANO-TZ"),
    String::from("HGBS-5"),
    String::from("HGBS-7"),
    String::from("HGBS-9"),
    String::from("HGBSP1-5"),
    String::from("HGBSP1-7"),
    String::from("HGBSP1-9"),
    String::from("HGBSP2-5"),
    String::from("HGBSP2-7"),
    String::from("HGBSP2-9"),
    String::from("HGBSP3-5"),
    String::from("HGBSP3-7"),
    String::from("HGBSP3-9"),
    String::from("IGLO-II"),
    String::from("IGLO-III"),
    String::from("jgauss-dzp"),
    String::from("jgauss-qz2p"),
    String::from("jgauss-qzp"),
    String::from("jgauss-tzp1"),
    String::from("jgauss-tzp2"),
    String::from("jorge-5ZP"),
    String::from("jorge-5ZP-DKH"),
    String::from("jorge-6ZP"),
    String::from("jorge-6ZP-DKH"),
    String::from("jorge-A5ZP"),
    String::from("jorge-ADZP"),
    String::from("jorge-AQZP"),
    String::from("jorge-ATZP"),
    String::from("jorge-DZP"),
    String::from("jorge-DZP-DKH"),
    String::from("jorge-QZP"),
    String::from("jorge-QZP-DKH"),
    String::from("jorge-TZP"),
    String::from("jorge-TZP-DKH"),
    String::from("jul-cc-pV(D+d)Z"),
    String::from("jul-cc-pV(Q+d)Z"),
    String::from("jul-cc-pV(T+d)Z"),
    String::from("jun-cc-pV(D+d)Z"),
    String::from("jun-cc-pV(Q+d)Z"),
    String::from("jun-cc-pV(T+d)Z"),
    String::from("Koga unpolarized"),
    String::from("LANL08"),
    String::from("LANL08(d)"),
    String::from("LANL08(f)"),
    String::from("LANL08+"),
    String::from("LANL2DZ"),
    String::from("LANL2DZ ECP"),
    String::from("LANL2DZdp"),
    String::from("LANL2TZ"),
    String::from("LANL2TZ(f)"),
    String::from("LANL2TZ+"),
    String::from("m6-31G"),
    String::from("m6-31G*"),
    String::from("maug-cc-pV(D+d)Z"),
    String::from("maug-cc-pV(Q+d)Z"),
    String::from("maug-cc-pV(T+d)Z"),
    String::from("may-cc-pV(Q+d)Z"),
    String::from("may-cc-pV(T+d)Z"),
    String::from("MIDI"),
    String::from("MIDI!"),
    String::from("MIDIX"),
    String::from("MINI"),
    String::from("modified-LANL2DZ"),
    String::from("NASA Ames ANO"),
    String::from("NASA Ames ANO2"),
    String::from("NASA Ames cc-pCV5Z"),
    String::from("NASA Ames cc-pCVQZ"),
    String::from("NASA Ames cc-pCVTZ"),
    String::from("NASA Ames cc-pV5Z"),
    String::from("NASA Ames cc-pVQZ"),
    String::from("NASA Ames cc-pVTZ"),
    String::from("NLO-V"),
    String::from("NMR-DKH (TZ2P)"),
    String::from("ORP"),
    String::from("Partridge Uncontracted 1"),
    String::from("Partridge Uncontracted 2"),
    String::from("Partridge Uncontracted 3"),
    String::from("Partridge Uncontracted 4"),
    String::from("pc-0"),
    String::from("pc-1"),
    String::from("pc-2"),
    String::from("pc-3"),
    String::from("pc-4"),
    String::from("pcemd-2"),
    String::from("pcemd-3"),
    String::from("pcemd-4"),
    String::from("pcH-1"),
    String::from("pcH-2"),
    String::from("pcH-3"),
    String::from("pcH-4"),
    String::from("pcJ-0"),
    String::from("pcJ-0_2006"),
    String::from("pcJ-1"),
    String::from("pcJ-1_2006"),
    String::from("pcJ-2"),
    String::from("pcJ-2_2006"),
    String::from("pcJ-3"),
    String::from("pcJ-3_2006"),
    String::from("pcJ-4"),
    String::from("pcJ-4_2006"),
    String::from("pcS-0"),
    String::from("pcS-1"),
    String::from("pcS-2"),
    String::from("pcS-3"),
    String::from("pcS-4"),
    String::from("pcseg-0"),
    String::from("pcseg-1"),
    String::from("pcseg-2"),
    String::from("pcseg-3"),
    String::from("pcseg-4"),
    String::from("pcSseg-0"),
    String::from("pcSseg-1"),
    String::from("pcSseg-2"),
    String::from("pcSseg-3"),
    String::from("pcSseg-4"),
    String::from("pcX-1"),
    String::from("pcX-2"),
    String::from("pcX-3"),
    String::from("pcX-4"),
    String::from("pSBKJC"),
    String::from("Pt - mDZP"),
    String::from("pV6Z"),
    String::from("pV7Z"),
    String::from("Roos Augmented Double Zeta ANO"),
    String::from("Roos Augmented Triple Zeta ANO"),
    String::from("s3-21G"),
    String::from("s3-21G*"),
    String::from("s6-31G"),
    String::from("s6-31G*"),
    String::from("Sadlej pVTZ"),
    String::from("Sadlej+"),
    String::from("sap_grasp_large"),
    String::from("sap_grasp_small"),
    String::from("sap_helfem_large"),
    String::from("sap_helfem_small"),
    String::from("Sapporo-DKH3-DZP"),
    String::from("Sapporo-DKH3-DZP-2012"),
    String::from("Sapporo-DKH3-DZP-2012-diffuse"),
    String::from("Sapporo-DKH3-DZP-diffuse"),
    String::from("Sapporo-DKH3-QZP"),
    String::from("Sapporo-DKH3-QZP-2012"),
    String::from("Sapporo-DKH3-QZP-2012-diffuse"),
    String::from("Sapporo-DKH3-QZP-diffuse"),
    String::from("Sapporo-DKH3-TZP"),
    String::from("Sapporo-DKH3-TZP-2012"),
    String::from("Sapporo-DKH3-TZP-2012-diffuse"),
    String::from("Sapporo-DKH3-TZP-diffuse"),
    String::from("Sapporo-DZP"),
    String::from("Sapporo-DZP-2012"),
    String::from("Sapporo-DZP-2012-diffuse"),
    String::from("Sapporo-DZP-diffuse"),
    String::from("Sapporo-QZP"),
    String::from("Sapporo-QZP-2012"),
    String::from("Sapporo-QZP-2012-diffuse"),
    String::from("Sapporo-QZP-diffuse"),
    String::from("Sapporo-TZP"),
    String::from("Sapporo-TZP-2012"),
    String::from("Sapporo-TZP-2012-diffuse"),
    String::from("Sapporo-TZP-diffuse"),
    String::from("SARC-DKH2"),
    String::from("SARC-ZORA"),
    String::from("SARC2-QZV-DKH2"),
    String::from("SARC2-QZV-DKH2-JKFIT"),
    String::from("SARC2-QZV-ZORA"),
    String::from("SARC2-QZV-ZORA-JKFIT"),
    String::from("SARC2-QZVP-DKH2"),
    String::from("SARC2-QZVP-DKH2-JKFIT"),
    String::from("SARC2-QZVP-ZORA"),
    String::from("SARC2-QZVP-ZORA-JKFIT"),
    String::from("SBKJC Polarized (p,2d) - LFK"),
    String::from("SBKJC-ECP"),
    String::from("SBKJC-VDZ"),
    String::from("SBO4-DZ(d)-3G"),
    String::from("SBO4-DZ(d,p)-3G"),
    String::from("SBO4-SZ-3G"),
    String::from("Scaled MINI"),
    String::from("STO-2G"),
    String::from("STO-3G"),
    String::from("STO-3G*"),
    String::from("STO-4G"),
    String::from("STO-5G"),
    String::from("STO-6G"),
    String::from("Stuttgart RLC"),
    String::from("Stuttgart RLC ECP"),
    String::from("Stuttgart RSC 1997"),
    String::from("Stuttgart RSC 1997 ECP"),
    String::from("Stuttgart RSC ANO"),
    String::from("Stuttgart RSC Segmented + ECP"),
    String::from("SV (Dunning-Hay)"),
    String::from("SV + Double Rydberg (Dunning-Hay)"),
    String::from("SV + Rydberg (Dunning-Hay)"),
    String::from("SVP (Dunning-Hay)"),
    String::from("SVP + Diffuse (Dunning-Hay)"),
    String::from("SVP + Diffuse + Rydberg (Dunning-Hay)"),
    String::from("SVP + Rydberg (Dunning-Hay)"),
    String::from("TZ (Dunning-Hay)"),
    String::from("TZP-ZORA"),
    String::from("UGBS"),
    String::from("un-ccemd-ref"),
    String::from("un-pcemd-ref"),
    String::from("Wachters+f"),
    String::from("WTBS"),
    String::from("x2c-JFIT"),
    String::from("x2c-JFIT-universal"),
    String::from("x2c-QZVPall"),
    String::from("x2c-QZVPall-2c"),
    String::from("x2c-QZVPall-2c-s"),
    String::from("x2c-QZVPall-s"),
    String::from("x2c-QZVPPall"),
    String::from("x2c-QZVPPall-2c"),
    String::from("x2c-QZVPPall-2c-s"),
    String::from("x2c-QZVPPall-s"),
    String::from("x2c-SV(P)all"),
    String::from("x2c-SV(P)all-2c"),
    String::from("x2c-SV(P)all-s"),
    String::from("x2c-SVPall"),
    String::from("x2c-SVPall-2c"),
    String::from("x2c-SVPall-s"),
    String::from("x2c-TZVPall"),
    String::from("x2c-TZVPall-2c"),
    String::from("x2c-TZVPall-s"),
    String::from("x2c-TZVPPall"),
    String::from("x2c-TZVPPall-2c"),
    String::from("x2c-TZVPPall-s")];

    //println!("{} may not be a valid basis set name.", basis);
    let matcher = SkimMatcherV2::default();
    let lower_basis = &basis.to_lowercase();
    let mut match_item = &String::new();
    let mut return_item: Option<String> = None;
    let mut score = 0;
    let mut tmp_score = 0;

    for item in basis_list.iter() {
        let tmp_score_some = matcher.fuzzy_match(&item, lower_basis);
        match tmp_score_some {
            Some(_) => {
                tmp_score = tmp_score_some.unwrap();
                //println!("basis set = {}, score = {}", item, tmp_score);
            },
            None => {
                //println!("None matched");
                continue
            },
        };
            
        if tmp_score > score {
            score = tmp_score;
            match_item = item;
        }
    }
    //println!("Similar basis set is {}", match_item);
    //match_item.clone()

    return_item = 
        if score != 0 {
            Some(match_item.clone())
        }
        else {
            None
        };

    return_item
        
}



#[test]
fn test_fuzzy() {
    let basis_name = String::from("abc");
    let m = basis_fuzzy_matcher(&basis_name);
    match m {
        Some(_) => println!("matched {}", m.unwrap()),
        None => println!("None matched"),
    }

    //let matcher = SkimMatcherV2::default();
    //let tmp_score = matcher.fuzzy_match("abx", "ab(x)").unwrap();
    //println!("score = {}", tmp_score);

}


/* 

 */